<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="author" content="hexinyang">		
		<title>暂时挂失</title>
		<script language="javascript" type="text/javascript" src="../script/print.js"></script>
		<script language="javascript" type="text/javascript" src="../script/pivot.js"></script>		
		<script language="javascript" src="../script/common.js" type="text/javascript"></script>
		<script language="javascript" type="text/javascript">
			function load(){			
				Eui.showNavigation();			
				setPages(["searchView","printView"]);	
				CardMgnt.cardUser.show("formDetail");
				//Rpc.loadPage("formDetail","card_detail_div.html");
			}
			//临时挂失
			function doTempLock(){
				var asn = searchForm.cardNumber.value;
				if(showQuestion("是否暂时挂失卡片：<br>【"+asn+"】?")){
					DWR.call("blacklistService.reportTempLostCard",asn,function(v){
						showInformation("暂时挂失成功.");
						switchPage("printView");	
					});
				}		
			}
			//查询显示信息明细
			function searchCard(){
				if(!checkForm(searchForm))return;			
				var asn = searchForm.cardNumber.value;
				DWR.call("mgntQueryService.checkCardLock",asn,function(data){
					var cardObj = CardMgnt.convertCardObject(data);
					Common.setValues(CardMgnt.cardUser.formName,cardObj);
					Common.showDetail("printView",cardObj);
				
					CardMgnt.cardUser.showData("formDetail",data);
					$("templockBtn").disabled = false;
				},{blockScreen : true});
			}
			
			//返回
			function onCancel(){
				searchForm.reset();
				CardMgnt.cardUser.show("formDetail");
				$("templockBtn").disabled = true;
				switchPage('searchView')
			}
		</script>
	</head>
	<body onload="load()">
		<!--页面导航-->
		<div class="nav">
			<div id="nav"></div>
		</div>
		<div id="searchView">
			<form name="searchForm" id="searchForm">
				<div class="form">
					<div class="formTitle">输入卡号</div>
					<table cellSpacing="0" cellPadding="4" width="100%" border="0" class="label5">
						<tr>
							<td><label>卡&nbsp;&nbsp;&nbsp;&nbsp;号</label> <input type="text" name="cardNumber" onBlur="checkV(this,'asn',true)"><span class="des">*</span></td>
							<td><span class=red>（请在查询后核对客户帐户信息）</span></td>
						</tr>
					</table>
				</div>
			</form>
			
				<div class="form">
					<div class="formTitle">卡片明细信息</div>
					<div id="formDetail"></div>
				</div>
				<p>
					<button type="button" onclick="searchCard()">查 询</button>
					<button type="button" id="templockBtn" onclick="doTempLock()" disabled>暂时挂失</button>
					<button type="button" onclick="onCancel()">取 消</button>
				</p>
		</div>
		<div id="printView" style="display:none;width:600px;">
			<div class = "form">
				<div class="formTitle">暂挂明细</div>
				<table cellSpacing="0" cellPadding="4" width="100%" border="0" class="label5 col2 viewTable">
					<tr>
						<td><label>卡&nbsp;&nbsp;&nbsp;&nbsp;号</label> <span id="asn"></span></td>
						<td><label>卡&nbsp;类&nbsp;型</label> <span id="subCardTypeText"></span></td>
					</tr>
					<tr>
						<td><label>客户名称</label> <span id="name"></span></td>
						<td><label>客户证件号</label> <span id="idno"></span></td>
					</tr>
					<tr>
						<td><label>有 效 期</label> <span id="expiredTime"></span></td>
						<td>&nbsp;</td>
					</tr>
				</table>
			</div>
			<p>
				<button type="button" name="retBtn" onclick="onCancel();">返 回</button>
			</p>
		</div>
	</body>
</html>
